/**
 * @file bsp_iflash.h
 * @brief 
 * @author  ()
 * @version 1.0
 * @date 2024-09-13
 * @ingroup bsp
 * @copyright Copyright (C) 2019 Queclink Wireless Solutions (ShenZhen) Co., Ltd. All Rights Reserved.
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-09-13 <td>1.0     <td>     <td>内容
 * </table>
 */
#ifndef __BSP_IFLASH_H
#define __BSP_IFLASH_H

#include <stdlib.h>
#include <stdint.h>


#ifdef __cplusplus
extern "C" {
#endif

#define BANK_1_ADDR     0x08000000
#define BANK_2_ADDR     0x08200000

void bsp_iflash_init(void);

void bsp_iflash_deinit(void);

size_t bsp_iflash_write(unsigned int addr, const void *buf, size_t len);
size_t bsp_iflash_write_random(unsigned int addr, const void *buf, size_t len);

size_t bsp_iflash_read(unsigned int addr, void *buf, size_t len);

size_t bsp_iflash_erase(unsigned int addr, size_t len);

#ifdef __cplusplus
}
#endif


#endif
